package design.pattern.装饰者模式.代理模式;

/**
 * 代理类
 */
public class ProxyClass implements Proxy {

    private Proxy object;

    ProxyClass(Proxy object){
        this.object = object;
    }

    @Override
    public void execute() {
        beforeExecute();
        object.execute();
        preExccute();
    }

    private void beforeExecute(){
        System.out.println("执行方法之前");
    }

    private void preExccute(){
        System.out.println("执行方法之后");
    }

}
